package com.mew.common.rest.events;

import com.mew.common.util.PbWriteUtils;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class OnlineGiftMessage extends ZebraBaseMessage<OnlineGiftMessage> {

    private String receiveType;
    private long onlineTime;
    private long[] boxGold;

    private int onlineCoeff;

    @Override
    public void write(ByteBuf byteBuf) {

        PbWriteUtils.attr2byte(this,byteBuf);
        writeLongArray(byteBuf,boxGold);
        writeInt(byteBuf,onlineCoeff);
    }

    @Override
    public OnlineGiftMessage read(ByteBuf byteBuf) {
        return null;
    }
}
